﻿namespace checc_baseTools
{

    public class SlopingCover
    {
        ///// <summary>
        ///// 斜盖板
        ///// </summary>
        ///// <param name="point3D">放置点</param>
        ///// <param name="gradient">盖板斜度</param>
        ///// <param name="longSide">长边</param>
        ///// <param name="shortSide">短边</param>
        ///// <param name="thicknesses">支点厚度</param>
        //public static void Create(GePoint3d point3D, double gradient, double longSide, double shortSide, double thicknesses)
        //{
        //    //点
        //    GePoint3d point3D_L2 = new GePoint3d(point3D.x, point3D.y + shortSide, point3D.z);
        //    GePoint3d point3D_R1 = new GePoint3d(point3D.x + longSide, point3D.y, point3D.z);

        //    GePoint3d point3D_R2 = new GePoint3d(point3D.x + longSide, point3D.y + shortSide, point3D.z);
        //    //旋转邻边得到斜边，斜边的长度 = 邻边长度 / Cos角度;
        //    GePoint3d point3D_R = Helper.Rotation(new GePoint3d(point3D_L2.x, point3D_L2.y, point3D_L2.z), new GePoint3d(point3D_R2.x, point3D_R2.y, point3D_R2.z), longSide / System.Math.Cos(System.Math.PI * gradient / 180), -gradient);
        //    point3D_R2.set(point3D_R.x, point3D_R.y, point3D_R.z);
        //    //线
        //    GeSegment3d segment_1 = new GeSegment3d(point3D, point3D_R1);
        //    IGeCurveBase curve1 = IGeCurveBase.createSegment(segment_1);
        //    GeSegment3d segment_2 = new GeSegment3d(point3D_R1, point3D_R2);
        //    IGeCurveBase curve2 = IGeCurveBase.createSegment(segment_2);
        //    GeSegment3d segment_3 = new GeSegment3d(point3D_R2, point3D_L2);
        //    IGeCurveBase curve3 = IGeCurveBase.createSegment(segment_3);
        //    GeSegment3d segment_4 = new GeSegment3d(point3D_L2, point3D);
        //    IGeCurveBase curve4 = IGeCurveBase.createSegment(segment_4);

        //    //面
        //    GeCurveArray curveArray = GeCurveArray.create(GeCurveArray.BoundaryType.Outer);
        //    curveArray.add(curve1);
        //    curveArray.add(curve2);
        //    curveArray.add(curve3);
        //    curveArray.add(curve4);

        //    //体
        //    GeVec3d v3d = new GeVec3d(0, 0, thicknesses);
        //    GeExtrusionInfo extrusionInfo = new GeExtrusionInfo(curveArray, v3d, true);
        //    IGeSolidBase solid = Element_solid.TensileBody(extrusionInfo);


        //}
    }
}
